package com.endoc.news.fragment.newslist.view.pictureview;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.appcompat.widget.LinearLayoutCompat;
import androidx.databinding.BindingAdapter;
import androidx.databinding.DataBindingUtil;

import com.bumptech.glide.Glide;
import com.endoc.news.R;
import com.endoc.news.databinding.PictureTitleViewBinding;
import com.endoc.news.fragment.base.BaseCustomView;
import com.endoc.news.fragment.base.IBaseCustomView;
import com.endoc.news.fragment.base.BaseViewModel;
import com.endoc.news.fragment.newslist.view.titleview.TitleViewModel;

import static com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions.withCrossFade;

public class PictureView extends BaseCustomView<PictureTitleViewBinding, PictureViewModel>  {

    //private PictureTitleViewBinding mPictureTitleViewBinding;

    public PictureView(@NonNull Context context) {
        super(context);
        //init(context);
    }

    @Override
    public void setViewModelToView(PictureViewModel pictureViewModel) {
      mViewBinding.setViewModel(pictureViewModel);
    }


    @Override
    public int getResourceId() {
        return R.layout.picture_title_view;
    }

    @Override
    public void onclick(View v) {

    }

  /*  private void init(Context context) {
        View inflate = LayoutInflater.from(context).inflate(R.layout.picture_title_view, this, false);
        mPictureTitleViewBinding = DataBindingUtil.bind(inflate);
        addView(mPictureTitleViewBinding.getRoot());
    }*/





  /*  @Override
    public void setData(BaseViewModel viewModel) {
        mPictureTitleViewBinding.setViewModel((PictureViewModel) viewModel);
        mPictureTitleViewBinding.executePendingBindings();
    }*/
}
